<!--
	报表管理(月报、年报)
-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JZ-energy</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="../css/public.css"/>
		<link rel="stylesheet" type="text/css" href="../css/icons-extra.css" />
		<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
		<link rel="stylesheet" type="text/css" href="../libs/minirefresh.min.css" />
		<link rel="stylesheet" type="text/css" href="../libs/themes/default/minirefresh.theme.default.min.css" />
		<style type="text/css">
			html,body {width: 100%;height: 100%;}
			.mui-input-row {height: 45px;padding: 8px;}
			.mui-input-row>input {margin-bottom: 0px;border: 0px;background: #FFFFFF;text-align: center;width: 90%;border-radius: 10px;height: 30px;margin-left: 5%;}
			#minirefresh {position: relative;}
		</style>
	</head>
	<body>
		<!--底部导航栏-->
		<nav class="mui-bar mui-bar-tab bg-FFF">
			<a class="mui-tab-item" href="allStation.html">
				<span class="mui-icon"><img src="../img/stationAll.png"/></span>
				<span class="mui-tab-label">总览</span>
			</a>
			<a class="mui-tab-item" href="deviceJC.html">
				<span class="mui-icon"><img src="../img/shebei.png"/></span>
				<span class="mui-tab-label">设备</span>
			</a>
			<a class="mui-tab-item" href="deviceGJ.html">
				<span class="mui-icon"><img src="../img/gaijing.png"/></span>
				<span class="mui-tab-label">异常</span>
			</a>
			<a class="mui-tab-item mui-active" href="reportGL.html?datesel=month">
				<span class="mui-icon"><img src="../img/baobiao-hover.png"/></span>
				<span class="mui-tab-label">报表</span>
			</a>
		</nav>
		<!--头部导航栏-->
		<header class="mui-bar mui-bar-nav bg-FFF">
			<a href="" class="mui-action-back mui-icon-extra mui-icon-extra-arrowleftcricle mui-pull-left col-fonts"></a>
			<a href="#topPopover" class="mui-pull-right">
				<div class="rightTop-more">
					<span></span>
					<span class="rightTop-more-two"></span>
					<span></span>
				</div>
			</a>
			<h1 class="mui-title col-fonts">报表管理</h1>
		</header>
		<!--右上角弹出菜单-->
		<div id="topPopover" class="mui-popover" style="height: 55px;width:93px !important;">
			<div class="mui-popover-arrow"></div>
			<div class="mui-scroll-wrapper">
				<div class="mui-scroll">
					<ul class="mui-table-view">
						<li class="mui-table-view-cell mui-media col-fonts font-13">
							<a href="index.html">
								<img src="../img/float-index.png" class="mui-pull-left floatMes" width="15px"/>
								<span class="mui-pull-right mess-center">首页</span>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!--设备检测内容-->
		<div class="mui-content bg-F8F wh-100">
			<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-primary activeCol col-fonts bg-FFF">
				<a href="#tab-offG" class="mui-control-item monthecord">月报
					<span class="deviceTL mui-pull-right"></span>
				</a>
				<a href="#tab-qxy" class="mui-control-item yearecord">年报</a>
			</div>
			<div id="minirefresh" class="minirefresh-wrap" style="height: calc(100% - 40px);">
			<div class="minirefresh-scroll" style="min-height: calc(100% - 40px);">
				<!--月报内容-->
				<div id="tab-offG" class="mui-control-content">
					<div class="mui-input-row">
						<input type="text" class="mui-pull-left months font-14 col-fonts" name="" id="month" value="" readonly="readonly"/>
						<img src="../img/bianjitime.svg" class="editImg"/>
					</div>
					<ul class="mui-table-view mui-table-view-chevron mar-top0 af-he be-he">
						<li class="mui-table-view-cell mui-media af-he be-he" id="dayReportModel" style="display: none;">
							<a href="dayReport.html" class="mui-navigate-right">
								<div id="params" style="display: none;"></div>
								<div id="daydate" class="mui-media-object mui-pull-left list-name bg-or col-FFF t-a" style="margin-top: 12px;">01</div>
								<div class="mui-media-body">
									<div class="col-fonts">
										<span class="font-13 leleve1 bRight">发电量：</span>
										<span class="font-13"> <b class="leleve2" id="daycap" data-fmtFun="num2OfEmpty">0.00</b> kWh</span>
									</div>
									<div class="col-fonts">
										<span class="font-13 leleve1 bRight">满发小时数：</span>
										<span class="font-13"><b class="leleve2" id="dayhour" data-fmtFun="num2OfEmpty">0.00</b> h</span>
									</div>
									<div class="col-fonts">
										<span class="font-13 leleve1 bRight">节约标煤：</span>
										<span class="font-13"><b class="leleve2" id="daycoal" data-fmtFun="num2OfEmpty">0.00</b> t</span>
									</div>
								</div>
							</a>
						</li>
						<li class="bank10" id="dayline" style="display: none;"></li>
					</ul>
				</div>
				<!--年报内容-->
				<div id="tab-qxy" class="mui-control-content">
					<div class="mui-input-row">
						<input type="text" class="years font-14 col-fonts" name="" id="year" value="2017" readonly="readonly"/>
						<img src="../img/bianjitime.svg" class="editImg"/>
					</div>
					<ul class="mui-table-view mui-table-view-chevron mar-top0 af-he be-he">
						<li class="mui-table-view-cell mui-media af-he be-he"  style="display: none;" id="monthReportModel">
							<a href="dayReport.html" class="mui-navigate-right">
								<div id="params" style="display: none;"></div>
								<div class="mui-media-object mui-pull-left list-name bg-or col-FFF t-a" style="margin-top: 12px;" id="monthdate">2016</div>
								<div class="mui-media-body">
									<div class="col-fonts">
										<span class="font-13 leleve1 bRight">发电量：</span>
										<span class="font-13"> <b class="leleve2" id="monthcap" data-fmtFun="num2OfEmpty">380.36</b> kWh</span>
									</div>
									<div class="col-fonts">
										<span class="font-13 leleve1 bRight">满发小时数：</span>
										<span class="font-13"><b class="leleve2" id="monthhour" data-fmtFun="num2OfEmpty">4.01</b> h</span>
									</div>
									<div class="col-fonts">
										<span class="font-13 leleve1 bRight">节约标煤：</span>
										<span class="font-13"><b class="leleve2" id="monthcoal" data-fmtFun="num2OfEmpty">141.23</b> kg</span>
									</div>
								</div>
							</a>
						</li>
						<li class="bank10"  style="display: none;" id="monthline"></li>
						
						
					</ul>
				</div>
			</div>
			<div>
		</div>
	</body>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/mui.min.js"></script>
	<script src="../js/main.js"></script>
	<script src="../js/report/psDayReport.js"></script>
	<script src="../js/mui.picker.min.js"></script>
	<script type="text/javascript" src="../libs/minirefresh.min.js"></script>
	<script type="text/javascript" src="../libs/themes/default/minirefresh.theme.default.min.js"></script>
	<script>
	initItem();
	function initItem(){
        //时间设定
        (function($) {
        	$('.months').off('tap');
			$('.months').on('tap', function() {
				//月报--开始时间和结束时间设定
				var options = {
					"type": "month",
					"beginDate": new Date(2000,0),
					"endDate": new Date(),
				};
				var picker = new mui.DtPicker(options);
				picker.show(function(rs) {
					$('.months')[0].value=rs.text;
					listDayReport();
					picker.dispose();
				});
			});
			$('.years').off('tap');
			$('.years').on('tap', function() {
				var picker = new mui.PopPicker();
				var starttime = 2000; //年份开始时间设定
				var year = new Date();
				var endtime = year.getFullYear(); //结束年份设置为当前年份
				var arr = [];
				for (var i = starttime; i < endtime + 1; i++) {
					arr.push({value: i,text: i});
				}
				picker.setData(arr)
				picker.pickers[0].setSelectedValue(endtime);
				picker.show(function(res) {
					$('.years')[0].value=res[0].text;
					picker.dispose();
				});
			});
		})($);
		//判断是从首页的哪里跳转过来的 
		var search = location.search;
        
		if(param.datesel){
			var datesel = param.datesel;
			if(datesel == "year"){
				$("#tab-offG, .monthecord").removeClass("mui-active");
				$("#tab-qxy, .yearecord").addClass("mui-active");
			}else if(datesel == "month") {
				$("#tab-qxy, .yearecord").removeClass("mui-active");
				$("#tab-offG, .monthecord").addClass("mui-active");
			}
		}
		
        //下拉刷新
		var miniRefresh = new MiniRefresh({
		    container: '#minirefresh',
		    down: {
		    	isLock:false,
		    	offset:50,
		    	successAnim:{
		    		isEnable:true,
		    		duration:500
		    	},
		        callback: function() {
		        	refresh();
		            setTimeout(function(){
		            	miniRefresh.endDownLoading(true,'');
		            },1000);
		        }
		    },
		    up:{isLock:true}
		});
	}
	</script>
</html>
